//! `SeaORM` Entity, @generated by sea-orm-codegen 1.0.1

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "message_queue")]
pub struct Model {
    #[sea_orm(
        primary_key,
        auto_increment = false,
        column_type = "VarBinary(StringLen::None)"
    )]
    pub queue_id: Vec<u8>,
    #[sea_orm(column_type = "Text")]
    pub name: String,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_many = "super::device_queue_sub::Entity")]
    DeviceQueueSub,
}

impl Related<super::device_queue_sub::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::DeviceQueueSub.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}
